package com.snacks;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import android.widget.TabWidget;

public class Home extends TabActivity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home);
		
		TabHost tabHost = getTabHost();
		
		TabSpec homespec = tabHost.newTabSpec("");
		homespec.setIndicator("", getResources().getDrawable(R.drawable.ic_tab1));
		Intent homeIntent = new Intent(this, Main.class);
		homespec.setContent(homeIntent);
		
		TabSpec postspec = tabHost.newTabSpec("");
		postspec.setIndicator("", getResources().getDrawable(R.drawable.ic_tab2));
		Intent postIntent = new Intent(this, Post.class);
		postspec.setContent(postIntent);
		
		TabSpec searchspec = tabHost.newTabSpec("");
		searchspec.setIndicator("",getResources().getDrawable(R.drawable.ic_tab3));
		Intent searchIntent = new Intent(this, Search.class);
		searchspec.setContent(searchIntent);
		
		TabSpec accountspec = tabHost.newTabSpec("");
		accountspec.setIndicator("", getResources().getDrawable(R.drawable.ic_tab5));
		Intent accountIntent = new Intent(this, Login.class);
		accountspec.setContent(accountIntent);
		
		tabHost.addTab(homespec);
		tabHost.addTab(postspec);
		tabHost.addTab(searchspec);
		tabHost.addTab(accountspec);
		
		/*TabWidget tw = getTabWidget();
		for(int i = 0;i<tw.getChildCount();i++){
			View v = tw.getChildAt(i);
			v.setBackgroundDrawable(getResources().getDrawable(R.drawable.tab_indicator));
		}*/
	}
	
	
	
}
